package br.com.petshow.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import br.com.petshow.dao.GenericDao.Operacao;
import br.com.petshow.model.GenericModel;
import br.com.petshow.utils.SqlField;

public interface IDaoMethods<T> {

	public void insertOrUpdate(T o) throws SQLException;

	public void delete(T o);

	public List<T> getList() throws SQLException;

	public List<T> getList(List<SqlField> filters) throws SQLException;

	public T getObjectById(Integer id) throws SQLException;

	public Integer getNextId() throws SQLException;
	
	abstract List<T> executeQueryList(String sql, List<SqlField> filter) throws SQLException;
	
	abstract T executeQuery(String sql) throws SQLException;
	
	abstract T executeQuery(String sql, List<SqlField> filter) throws SQLException;
	
	abstract void executeSql(String sql, T obj, Operacao operacao);

	abstract T tratarRetorno(ResultSet rs) throws SQLException;
	
	abstract List<T> tratarRetornoList(ResultSet rs) throws SQLException;
	
}
